<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>桌面插件管理</title>
	<%@include file="/WEB-INF/views/include/head.jsp" %>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctxAdmin}/sys/desktopPlug/">桌面插件列表</a></li>
		<li class="active"><a href="${ctxAdmin}/sys/desktopPlug/form?id=${desktopPlug.id}">桌面插件列表<shiro:hasPermission name="sys:desktopPlug:edit">${not empty desktopPlug.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:desktopPlug:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	
	<form:form id="inputForm" modelAttribute="desktopPlug" action="${ctxAdmin}/sys/desktopPlug/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>	
		
		
		<div class="form-group">
			<label class="col-sm-2 control-label">名称：</label>
			<div class="col-sm-3">
				<form:input path="name" htmlEscape="false" maxlength="255" class="form-control"/>
			</div>

			<label class="col-sm-2 control-label">缩略图：</label>
			<div class="col-sm-3">
				<form:input path="icon" htmlEscape="false" maxlength="255" class="form-control"/>
			</div>
			
					
		</div>
		

<%-- 		<div class="form-group">
		
			
			<label class="col-sm-2 control-label">长：</label>
			<div class="col-sm-3">
				<form:input path="width" htmlEscape="false" maxlength="4" class="form-control number"/>
			</div>
			
			<label class="col-sm-2 control-label">高：</label>
			<div class="col-sm-3">
				<form:input path="height" htmlEscape="false" maxlength="4" class="form-control number"/>
			</div>
					
		</div> --%>
		
		
				
		<div class="form-group">
		
			
			<label class="col-sm-2 control-label">url：</label>
			<div class="col-sm-3">
				<form:input path="url" htmlEscape="false" maxlength="255" class="form-control"/>
			</div>
			
					
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label">样式：</label>
			<div class="col-sm-8">
				<form:textarea path="css" htmlEscape="false" rows="4" maxlength="255" class="form-control"/>
			</div>
		</div>
		
				
		<div class="form-group">
			<label class="col-sm-2 control-label">备注：</label>
			<div class="col-sm-8">
				<form:textarea path="remark" htmlEscape="false" rows="4" maxlength="1000" class="form-control"/>
			</div>
		</div>
		
		<div class="form-group action-button">
			<shiro:hasPermission name="sys:desktopPlug:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
		
	</form:form>
</body>
</html>